<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!--  默认赋值  es6-->
    <script>
        /* function go(method="get"){
            console.log(method)
        }
        go();
        go("post") */

        function go({
            url,
            method="get",
            
        }){
            console.log(method);
            console.log(url)
        }
        go({1})
        go({
            url:"xxx"
        })

        go({
            method:"post",
            url:"postxx"
        })
        
    </script>
</body>
</html>